package com.xc.controller.backend;

import com.xc.common.ServerResponse;
import com.xc.service.IUserCashDetailService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

/**
 * @author mipha
 * @version 1.0
 * @date 2019/3/14 10:04 PM
 */
@Controller
@RequestMapping("/admin/cash/")
@Slf4j
public class AdminCashDetailController {

    @Autowired
    IUserCashDetailService iUserCashDetailService;

    /**
     *      资金明细列表
     * @param userId
     * @param userName
     * @param agentId
     * @param positionId
     * @param pageNum
     * @param pageSize
     * @return
     */
    @RequestMapping("list.do")
    @ResponseBody
    public ServerResponse list(@RequestParam(value = "userId", required = false) Integer userId
            ,@RequestParam(value = "userName", required = false) String userName
            ,@RequestParam(value = "agentId", required = false) Integer agentId
            ,@RequestParam(value = "positionId",required = false) Integer positionId
            ,@RequestParam(value = "pageNum", defaultValue = "1") int pageNum
            ,@RequestParam(value = "pageSize", defaultValue = "10") int pageSize){
        return iUserCashDetailService.listByAdmin(userId ,userName , agentId, positionId,pageNum ,pageSize);
    }





}
